package com.viphuli.http.handler;

import java.util.List;

import com.viphuli.fragment.PurchaseOrderFillFragment;
import com.viphuli.http.bean.page.PurchaseOrderPage;
import com.viphuli.http.bean.part.PurchaseOrder;

public class PurchaseAutoFillAlreadyOrderResponseHandler extends MyBaseHttpResponseHandler<PurchaseOrderFillFragment, PurchaseOrderPage>{
	
	@Override
	public void deal() {
		List<PurchaseOrder> list = page.getList();
		
		if (list != null && !list.isEmpty()) {
			
			PurchaseOrder order = list.iterator().next();

			//填充数据
			caller.getOrderSite().setText(order.getAddress());
			caller.getOrderBetterSite().setText(order.getBetterAddress());
			caller.getOrderPhone().setText(order.getTel());
			caller.getOrderContacts().setText(order.getPersonContact());


		} 
	}
	
}
